﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_CapNhatSoDuHangHoa : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvTKHangHoa")]
        private ADVAccount _AdvTKHangHoa;
        [AccessedThroughProperty("CboDonViTinh")]
        private ComboBox _CboDonViTinh;
        [AccessedThroughProperty("CboKho")]
        private ComboBox _CboKho;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CKHanDung")]
        private CheckBox _CKHanDung;
        [AccessedThroughProperty("CKNgayNhap")]
        private CheckBox _CKNgayNhap;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("CmdTimHangHoa")]
        private Button _CmdTimHangHoa;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("TxtDienGiai")]
        private TextBox _TxtDienGiai;
        [AccessedThroughProperty("TxtDonGia")]
        private C1NumericEdit _TxtDonGia;
        [AccessedThroughProperty("TxtHanSuDung")]
        private DateTimePicker _TxtHanSuDung;
        [AccessedThroughProperty("TxtMaHang")]
        private TextBox _TxtMaHang;
        [AccessedThroughProperty("TxtNgayNhap")]
        private DateTimePicker _TxtNgayNhap;
        [AccessedThroughProperty("TxtQuyCach")]
        private C1NumericEdit _TxtQuyCach;
        [AccessedThroughProperty("TxtSerial")]
        private TextBox _TxtSerial;
        [AccessedThroughProperty("TxtSoLoHang")]
        private TextBox _TxtSoLoHang;
        [AccessedThroughProperty("TxtSoLuong")]
        private C1NumericEdit _TxtSoLuong;
        [AccessedThroughProperty("TxtTenHang")]
        private TextBox _TxtTenHang;
        [AccessedThroughProperty("TxtThanhTien")]
        private C1NumericEdit _TxtThanhTien;
        [AccessedThroughProperty("TxtThanhTienGS")]
        private C1NumericEdit _TxtThanhTienGS;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        private string cFrmFormat;
        public string cFrmKhoa;
        public string cFrmKhoaHangHoa;
        public string cFrmNamThang;
        private IContainer components;
        private string mKhoaKho;
        private clsDMHangHoa objHH;
        private clsSoDuDauKyHangHoa objTKHH;
        private DataTable pData;

        public Frm_CapNhatSoDuHangHoa()
        {
            base.FormClosed += new FormClosedEventHandler(this.Frm_CapNhatSoDuHangHoa_FormClosed);
            base.Load += new EventHandler(this.Frm_CapNhatSoDuHangHoa_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoa = "";
            this.cFrmNamThang = "";
            this.cFrmKhoaHangHoa = "";
            this.objHH = new clsDMHangHoa();
            this.objTKHH = new clsSoDuDauKyHangHoa();
            this.InitializeComponent();
        }

        public void BuildComboDVT(string pKhoaHH)
        {
            this.pData = this.objHH.GetListDonViTinh(pKhoaHH);
            this.CboDonViTinh.DataSource = this.pData;
            this.CboDonViTinh.ValueMember = "Khoa";
            this.CboDonViTinh.DisplayMember = "DonViTinh";
        }

        private void CboDonViTinh_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.CboDonViTinh.SelectedIndex >= 0)
            {
                int selectedIndex = this.CboDonViTinh.SelectedIndex;
                this.TxtQuyCach.Value = RuntimeHelpers.GetObjectValue(this.pData.Rows[selectedIndex][2]);
            }
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = this.CboLoaiTien.SelectedValue.ToString();
                clsDMLoaiTien tien = new clsDMLoaiTien();
                tien.LoadByCode(strCode);
                this.txtTyGia.Value = tien.TyGia;
                if (tien.SoLe > 0)
                {
                    this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("##########", tien.SoLe);
                }
                this.FormatNumber();
                if (tien.TienViet == 1)
                {
                    this.txtTyGia.Enabled = false;
                }
            }
        }

        public bool CheckIvalid()
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaHangHoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn h\x00e0ng h\x00f3a tồn kho!", ""));
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập loại tiền hạch to\x00e1n!", ""));
                this.CboLoaiTien.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKho.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn kho chứa h\x00e0ng!", ""));
                this.CboKho.Focus();
                return false;
            }
            if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtSoLuong.Value), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải nhập số lượng h\x00e0ng tồn kho!", ""));
                this.TxtSoLuong.Focus();
                return false;
            }
            return true;
        }

        private void CKHanDung_CheckedChanged(object sender, EventArgs e)
        {
            this.TxtHanSuDung.Enabled = this.CKHanDung.Checked;
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.TinhTien();
            if (this.CheckIvalid() && !Conversions.ToBoolean(Microsoft.VisualBasic.CompilerServices.Operators.NotObject(this.UpdateData())))
            {
                this.Dispose();
            }
        }

        private void CmdTimHangHoa_Click(object sender, EventArgs e)
        {
            this.FindGoods();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        public void EmptyData()
        {
            this.AdvTKHangHoa.Value = "";
            this.CboKho.SelectedValue = "";
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            EventArgs e = new EventArgs();
            this.CboLoaiTien_SelectedIndexChanged(this, e);
            this.TxtSoLuong.Value = 0;
            this.TxtDonGia.Value = 0;
            this.TxtThanhTien.Value = 0;
            this.TxtThanhTienGS.Value = 0;
        }

        public void FindGoods()
        {
            string pValue = SearchModule.SearchHangHoa("", "", "");
            if (LVYModule.ReturnIfNull(pValue, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                object instance = Strings.Split(pValue, "|", -1, CompareMethod.Binary);
                this.cFrmKhoaHangHoa = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 0 }, null));
                this.TxtMaHang.Text = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 1 }, null));
                this.TxtTenHang.Text = Conversions.ToString(NewLateBinding.LateIndexGet(instance, new object[] { 2 }, null));
                this.BuildComboDVT(this.cFrmKhoaHangHoa);
                this.objHH.Load(this.cFrmKhoa);
                this.AdvTKHangHoa.Value = this.objHH.KhoaTKHangHoa;
                this.CboDonViTinh.SelectedValue = this.objHH.KhoaDonViTinh;
                this.TxtQuyCach.Value = 1;
            }
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.txtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtDonGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtThanhTien, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtThanhTienGS, modGeneral.H_FORMATNUMBER);
        }

        private void Frm_CapNhatSoDuHangHoa_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.cFrmKhoa = "";
            this.cFrmKhoaHangHoa = "";
        }

        private void Frm_CapNhatSoDuHangHoa_Load(object sender, EventArgs e)
        {
            BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            BuildComboModule.BuildCombo(this.CboKho, modGeneral.ListDanhMuc.KhoHang, false, "", "");
            this.cFrmFormat = modGeneral.H_FORMATNUMBER;
            this.CKHanDung.Enabled = modGeneral.H_THEODOIHANDUNG;
            this.TxtSoLoHang.ReadOnly = !modGeneral.H_THEODOISOLOHANG;
            this.CKNgayNhap.Checked = false;
            this.CKNgayNhap.Enabled = modGeneral.H_LOAIGIA != "A";
            this.TxtNgayNhap.Enabled = (modGeneral.H_LOAIGIA != "A") & this.CKNgayNhap.Checked;
            if (this.cFrmKhoa.Trim() == "")
            {
                this.EmptyData();
                this.cFrmKhoa = modGeneral.CreatKey("GL_SoDuDauKyHangHoa", 15, "");
                this.CboKho.SelectedValue = LVYModule.ReturnIfNull(this.mKhoaKho, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                this.BuildComboDVT(this.cFrmKhoaHangHoa);
                this.objHH.Load(this.cFrmKhoaHangHoa);
                this.CboDonViTinh.SelectedValue = this.objHH.KhoaDonViTinh;
                this.AdvTKHangHoa.Value = this.objHH.KhoaTKHangHoa;
            }
            else
            {
                this.ShowData(this.cFrmKhoa);
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_CapNhatSoDuHangHoa));
            this.TxtDonGia = new C1NumericEdit();
            this.Label9 = new Label();
            this.TxtThanhTien = new C1NumericEdit();
            this.TxtThanhTienGS = new C1NumericEdit();
            this.Label5 = new Label();
            this.Label3 = new Label();
            this.TxtSoLuong = new C1NumericEdit();
            this.Label2 = new Label();
            this.GroupBox1 = new GroupBox();
            this.TxtHanSuDung = new DateTimePicker();
            this.Label13 = new Label();
            this.TxtSerial = new TextBox();
            this.CKHanDung = new CheckBox();
            this.CboKho = new ComboBox();
            this.Label14 = new Label();
            this.TxtDienGiai = new TextBox();
            this.TxtNgayNhap = new DateTimePicker();
            this.Label12 = new Label();
            this.TxtSoLoHang = new TextBox();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label8 = new Label();
            this.AdvTKHangHoa = new ADVAccount();
            this.TxtQuyCach = new C1NumericEdit();
            this.Label7 = new Label();
            this.Label4 = new Label();
            this.CboDonViTinh = new ComboBox();
            this.CmdTimHangHoa = new Button();
            this.TxtTenHang = new TextBox();
            this.TxtMaHang = new TextBox();
            this.Label6 = new Label();
            this.Label1 = new Label();
            this.CKNgayNhap = new CheckBox();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            ((ISupportInitialize) this.TxtDonGia).BeginInit();
            ((ISupportInitialize) this.TxtThanhTien).BeginInit();
            ((ISupportInitialize) this.TxtThanhTienGS).BeginInit();
            ((ISupportInitialize) this.TxtSoLuong).BeginInit();
            this.GroupBox1.SuspendLayout();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            ((ISupportInitialize) this.TxtQuyCach).BeginInit();
            this.SuspendLayout();
            this.TxtDonGia.BorderStyle = BorderStyle.FixedSingle;
            this.TxtDonGia.FormatType = FormatTypeEnum.StandardNumber;
            Point point = new Point(0x6c, 0xf9);
            this.TxtDonGia.Location = point;
            this.TxtDonGia.Name = "TxtDonGia";
            Padding padding = new Padding(1);
            this.TxtDonGia.Padding = padding;
            this.TxtDonGia.ReadOnly = true;
            Size size = new Size(0x73, 20);
            this.TxtDonGia.Size = size;
            this.TxtDonGia.TabIndex = 13;
            this.TxtDonGia.Tag = null;
            this.TxtDonGia.TextAlign = HorizontalAlignment.Right;
            this.TxtDonGia.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtDonGia.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtDonGia.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label9.AutoSize = true;
            point = new Point(8, 0xfb);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            size = new Size(0x2c, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x77;
            this.Label9.Text = "Đơn gi\x00e1";
            this.Label9.TextAlign = ContentAlignment.TopRight;
            this.TxtThanhTien.BorderStyle = BorderStyle.FixedSingle;
            this.TxtThanhTien.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x138, 220);
            this.TxtThanhTien.Location = point;
            this.TxtThanhTien.Name = "TxtThanhTien";
            padding = new Padding(1);
            this.TxtThanhTien.Padding = padding;
            size = new Size(0x73, 20);
            this.TxtThanhTien.Size = size;
            this.TxtThanhTien.TabIndex = 12;
            this.TxtThanhTien.Tag = null;
            this.TxtThanhTien.TextAlign = HorizontalAlignment.Right;
            this.TxtThanhTien.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtThanhTien.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtThanhTien.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.TxtThanhTienGS.BorderStyle = BorderStyle.FixedSingle;
            this.TxtThanhTienGS.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x138, 250);
            this.TxtThanhTienGS.Location = point;
            this.TxtThanhTienGS.Name = "TxtThanhTienGS";
            padding = new Padding(1);
            this.TxtThanhTienGS.Padding = padding;
            this.TxtThanhTienGS.ReadOnly = true;
            size = new Size(0x73, 20);
            this.TxtThanhTienGS.Size = size;
            this.TxtThanhTienGS.TabIndex = 14;
            this.TxtThanhTienGS.Tag = null;
            this.TxtThanhTienGS.TextAlign = HorizontalAlignment.Right;
            this.TxtThanhTienGS.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtThanhTienGS.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtThanhTienGS.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label5.AutoSize = true;
            point = new Point(0xf8, 0xfc);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x2c, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0x79;
            this.Label5.Text = "Quy đổi";
            this.Label5.TextAlign = ContentAlignment.TopRight;
            this.Label3.AutoSize = true;
            point = new Point(0xf8, 0xdf);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x24, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x75;
            this.Label3.Text = "Trị gi\x00e1";
            this.Label3.TextAlign = ContentAlignment.TopRight;
            this.TxtSoLuong.BorderStyle = BorderStyle.FixedSingle;
            this.TxtSoLuong.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x6c, 220);
            this.TxtSoLuong.Location = point;
            this.TxtSoLuong.Name = "TxtSoLuong";
            padding = new Padding(1);
            this.TxtSoLuong.Padding = padding;
            size = new Size(0x70, 20);
            this.TxtSoLuong.Size = size;
            this.TxtSoLuong.TabIndex = 11;
            this.TxtSoLuong.Tag = null;
            this.TxtSoLuong.TextAlign = HorizontalAlignment.Right;
            this.TxtSoLuong.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtSoLuong.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtSoLuong.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label2.AutoSize = true;
            point = new Point(8, 0xdf);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x31, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x73;
            this.Label2.Text = "Số lượng";
            this.Label2.TextAlign = ContentAlignment.TopRight;
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.TxtHanSuDung);
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Controls.Add(this.TxtSerial);
            this.GroupBox1.Controls.Add(this.CKHanDung);
            this.GroupBox1.Controls.Add(this.CboKho);
            this.GroupBox1.Controls.Add(this.Label14);
            this.GroupBox1.Controls.Add(this.TxtDienGiai);
            this.GroupBox1.Controls.Add(this.TxtNgayNhap);
            this.GroupBox1.Controls.Add(this.Label12);
            this.GroupBox1.Controls.Add(this.TxtSoLoHang);
            this.GroupBox1.Controls.Add(this.CboLoaiTien);
            this.GroupBox1.Controls.Add(this.txtTyGia);
            this.GroupBox1.Controls.Add(this.Label11);
            this.GroupBox1.Controls.Add(this.Label10);
            this.GroupBox1.Controls.Add(this.Label8);
            this.GroupBox1.Controls.Add(this.AdvTKHangHoa);
            this.GroupBox1.Controls.Add(this.TxtQuyCach);
            this.GroupBox1.Controls.Add(this.Label7);
            this.GroupBox1.Controls.Add(this.Label4);
            this.GroupBox1.Controls.Add(this.CboDonViTinh);
            this.GroupBox1.Controls.Add(this.CmdTimHangHoa);
            this.GroupBox1.Controls.Add(this.TxtTenHang);
            this.GroupBox1.Controls.Add(this.TxtMaHang);
            this.GroupBox1.Controls.Add(this.TxtThanhTienGS);
            this.GroupBox1.Controls.Add(this.Label5);
            this.GroupBox1.Controls.Add(this.TxtDonGia);
            this.GroupBox1.Controls.Add(this.Label9);
            this.GroupBox1.Controls.Add(this.TxtThanhTien);
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.TxtSoLuong);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Controls.Add(this.Label6);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.CKNgayNhap);
            point = new Point(7, 3);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(440, 0x13a);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 9;
            this.GroupBox1.TabStop = false;
            this.TxtHanSuDung.Enabled = false;
            this.TxtHanSuDung.Format = DateTimePickerFormat.Short;
            point = new Point(0x143, 0x2c);
            this.TxtHanSuDung.Location = point;
            this.TxtHanSuDung.Name = "TxtHanSuDung";
            size = new Size(0x68, 20);
            this.TxtHanSuDung.Size = size;
            this.TxtHanSuDung.TabIndex = 0x90;
            this.Label13.AutoSize = true;
            this.Label13.Enabled = false;
            point = new Point(5, 0x4b);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x27, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x8e;
            this.Label13.Text = "Số seri";
            this.TxtSerial.Enabled = false;
            point = new Point(0x6c, 0x48);
            this.TxtSerial.Location = point;
            this.TxtSerial.Name = "TxtSerial";
            size = new Size(0x70, 20);
            this.TxtSerial.Size = size;
            this.TxtSerial.TabIndex = 0x8d;
            this.CKHanDung.AutoSize = true;
            point = new Point(0xf6, 0x2f);
            this.CKHanDung.Location = point;
            this.CKHanDung.Name = "CKHanDung";
            size = new Size(0x49, 0x11);
            this.CKHanDung.Size = size;
            this.CKHanDung.TabIndex = 4;
            this.CKHanDung.Text = "Hạn d\x00f9ng";
            this.CKHanDung.UseVisualStyleBackColor = true;
            this.CboKho.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboKho.FormattingEnabled = true;
            point = new Point(0x6c, 0x9f);
            this.CboKho.Location = point;
            this.CboKho.Name = "CboKho";
            size = new Size(0x13f, 0x15);
            this.CboKho.Size = size;
            this.CboKho.TabIndex = 8;
            this.Label14.AutoSize = true;
            point = new Point(8, 0x11b);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x30, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 140;
            this.Label14.Text = "Diễn giải";
            point = new Point(0x6c, 280);
            this.TxtDienGiai.Location = point;
            this.TxtDienGiai.Name = "TxtDienGiai";
            size = new Size(0x13f, 20);
            this.TxtDienGiai.Size = size;
            this.TxtDienGiai.TabIndex = 15;
            this.TxtNgayNhap.Enabled = false;
            this.TxtNgayNhap.Format = DateTimePickerFormat.Short;
            point = new Point(0x143, 0x48);
            this.TxtNgayNhap.Location = point;
            this.TxtNgayNhap.Name = "TxtNgayNhap";
            size = new Size(0x68, 20);
            this.TxtNgayNhap.Size = size;
            this.TxtNgayNhap.TabIndex = 5;
            this.Label12.AutoSize = true;
            point = new Point(5, 0x2f);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x3a, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 0x88;
            this.Label12.Text = "Số l\x00f4 h\x00e0ng";
            point = new Point(0x6c, 0x2c);
            this.TxtSoLoHang.Location = point;
            this.TxtSoLoHang.Name = "TxtSoLoHang";
            size = new Size(0x70, 20);
            this.TxtSoLoHang.Size = size;
            this.TxtSoLoHang.TabIndex = 3;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x6c, 0xbd);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x70, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 9;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x138, 0xbd);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(0x73, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 10;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            point = new Point(8, 0xc0);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x86;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            point = new Point(0xf8, 0xc0);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 0x85;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label8.AutoSize = true;
            point = new Point(5, 0x85);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x67, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 130;
            this.Label8.Text = "T\x00e0i khoản h\x00e0ng h\x00f3a";
            this.AdvTKHangHoa.Conditions = "";
            this.AdvTKHangHoa.DefaultValue = "";
            this.AdvTKHangHoa.FieldNameFilter = "Left(SoTaiKhoan,2)";
            this.AdvTKHangHoa.KeyFilter = "15";
            point = new Point(0x6c, 130);
            this.AdvTKHangHoa.Location = point;
            padding = new Padding(0);
            this.AdvTKHangHoa.Margin = padding;
            this.AdvTKHangHoa.Name = "AdvTKHangHoa";
            this.AdvTKHangHoa.OnlyDigit = false;
            this.AdvTKHangHoa.ReadOnly = true;
            size = new Size(0x13f, 20);
            this.AdvTKHangHoa.Size = size;
            this.AdvTKHangHoa.TabIndex = 7;
            this.AdvTKHangHoa.UpperText = true;
            this.AdvTKHangHoa.Value = "";
            this.AdvTKHangHoa.WithCode = 80;
            this.TxtQuyCach.BorderStyle = BorderStyle.FixedSingle;
            this.TxtQuyCach.FormatType = FormatTypeEnum.StandardNumber;
            point = new Point(0x143, 100);
            this.TxtQuyCach.Location = point;
            this.TxtQuyCach.Name = "TxtQuyCach";
            padding = new Padding(1);
            this.TxtQuyCach.Padding = padding;
            this.TxtQuyCach.ReadOnly = true;
            size = new Size(0x68, 20);
            this.TxtQuyCach.Size = size;
            this.TxtQuyCach.TabIndex = 0x7f;
            this.TxtQuyCach.Tag = null;
            this.TxtQuyCach.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtQuyCach.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtQuyCach.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label7.AutoSize = true;
            point = new Point(0xf2, 0x68);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x35, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x80;
            this.Label7.Text = "Quy c\x00e1ch";
            this.Label7.TextAlign = ContentAlignment.TopRight;
            this.Label4.AutoSize = true;
            point = new Point(6, 0x67);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(60, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x7e;
            this.Label4.Text = "Đơn vị t\x00ednh";
            this.CboDonViTinh.FormattingEnabled = true;
            point = new Point(0x6c, 100);
            this.CboDonViTinh.Location = point;
            this.CboDonViTinh.Name = "CboDonViTinh";
            size = new Size(0x70, 0x15);
            this.CboDonViTinh.Size = size;
            this.CboDonViTinh.TabIndex = 6;
            this.CmdTimHangHoa.FlatStyle = FlatStyle.System;
            point = new Point(0x198, 15);
            this.CmdTimHangHoa.Location = point;
            this.CmdTimHangHoa.Name = "CmdTimHangHoa";
            size = new Size(0x16, 0x16);
            this.CmdTimHangHoa.Size = size;
            this.CmdTimHangHoa.TabIndex = 2;
            this.CmdTimHangHoa.Text = "...";
            this.CmdTimHangHoa.UseVisualStyleBackColor = true;
            point = new Point(0xbc, 0x10);
            this.TxtTenHang.Location = point;
            this.TxtTenHang.Name = "TxtTenHang";
            this.TxtTenHang.ReadOnly = true;
            size = new Size(220, 20);
            this.TxtTenHang.Size = size;
            this.TxtTenHang.TabIndex = 1;
            point = new Point(0x6c, 0x10);
            this.TxtMaHang.Location = point;
            this.TxtMaHang.Name = "TxtMaHang";
            this.TxtMaHang.ReadOnly = true;
            size = new Size(80, 20);
            this.TxtMaHang.Size = size;
            this.TxtMaHang.TabIndex = 0;
            this.Label6.AutoSize = true;
            point = new Point(8, 0xa2);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x35, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x6f;
            this.Label6.Text = "Kho h\x00e0ng";
            this.Label1.AutoSize = true;
            point = new Point(5, 0x13);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x36, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 2;
            this.Label1.Text = "H\x00e0ng h\x00f3a";
            this.CKNgayNhap.AutoSize = true;
            this.CKNgayNhap.Enabled = false;
            point = new Point(0xf6, 0x4b);
            this.CKNgayNhap.Location = point;
            this.CKNgayNhap.Name = "CKNgayNhap";
            size = new Size(0x4e, 0x11);
            this.CKNgayNhap.Size = size;
            this.CKNgayNhap.TabIndex = 0x8f;
            this.CKNgayNhap.Text = "Ng\x00e0y nhập";
            this.CKNgayNhap.UseVisualStyleBackColor = true;
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x16e, 0x142);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(80, 0x1a);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 11;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x11b, 0x142);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4f, 0x1a);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x10;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x1ca, 0x15f);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_CapNhatSoDuHangHoa";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "CAP NHAT SO DU DAU KY HANG HOA";
            ((ISupportInitialize) this.TxtDonGia).EndInit();
            ((ISupportInitialize) this.TxtThanhTien).EndInit();
            ((ISupportInitialize) this.TxtThanhTienGS).EndInit();
            ((ISupportInitialize) this.TxtSoLuong).EndInit();
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            ((ISupportInitialize) this.TxtQuyCach).EndInit();
            this.ResumeLayout(false);
        }

        public void ShowData(string pKhoa)
        {
            this.objTKHH.Load(pKhoa);
            clsSoDuDauKyHangHoa objTKHH = this.objTKHH;
            this.cFrmKhoa = objTKHH.Khoa;
            this.cFrmKhoaHangHoa = objTKHH.KhoaHangHoa;
            this.cFrmNamThang = objTKHH.NamThang;
            this.objHH.Load(objTKHH.KhoaHangHoa);
            this.TxtMaHang.Text = this.objHH.Ma;
            this.TxtTenHang.Text = this.objHH.TenViet;
            this.BuildComboDVT(objTKHH.KhoaHangHoa);
            this.TxtSoLoHang.Text = objTKHH.SoLoHang.Trim();
            this.CboDonViTinh.SelectedValue = objTKHH.KhoaDonViTinh;
            this.txtTyGia.Value = objTKHH.TyGia;
            this.AdvTKHangHoa.Value = objTKHH.KhoaTKHangHoa;
            this.CboKho.SelectedValue = objTKHH.KhoaKho;
            this.CboLoaiTien.SelectedValue = objTKHH.LoaiTien;
            this.txtTyGia.Value = objTKHH.TyGia;
            this.TxtSoLuong.Value = objTKHH.SoLuong;
            this.TxtDonGia.Value = objTKHH.DonGia;
            this.TxtThanhTien.Value = objTKHH.ThanhTienNT;
            this.TxtThanhTienGS.Value = objTKHH.ThanhTien;
            this.TxtDienGiai.Text = objTKHH.DienGiai;
            if (objTKHH.HanSuDung.Trim() != "")
            {
                this.TxtHanSuDung.Text = LVYModule.Char2Date(objTKHH.HanSuDung);
                this.CKHanDung.Checked = true;
            }
            else
            {
                this.CKHanDung.Checked = false;
            }
            if (objTKHH.NgayNhap.Trim() != "")
            {
                this.CKNgayNhap.Checked = true;
                this.TxtNgayNhap.TabIndex = Conversions.ToInteger(LVYModule.Char2Date(objTKHH.NgayNhap));
            }
            else
            {
                this.CKNgayNhap.Checked = false;
            }
            objTKHH = null;
        }

        public void TinhTien()
        {
            double num2 = 0.0;
            double num = 0.0;
            double num3 = 0.0;
            num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtSoLuong.Value), 0, modGeneral.TypeOfValue.Nothing));
            num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtDonGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            this.TxtThanhTien.Value = num2 * num;
            this.TxtThanhTienGS.Value = (num2 * num) * num3;
        }

        private void TxtDienGiai_LostFocus(object sender, EventArgs e)
        {
            this.CmdOK.Focus();
        }

        private void TxtDonGia_LostFocus(object sender, EventArgs e)
        {
            this.TinhTien();
        }

        private void TxtSoLuong_LostFocus(object sender, EventArgs e)
        {
            this.TinhTien();
        }

        private void TxtThanhTien_LostFocus(object sender, EventArgs e)
        {
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtThanhTien.Value), 0, modGeneral.TypeOfValue.Nothing));
            double num3 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            this.TxtThanhTienGS.Value = num2 * num3;
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtSoLuong.Value), 0, modGeneral.TypeOfValue.Nothing));
            if (num != 0.0)
            {
                this.TxtDonGia.Value = Math.Round((double) (num2 / num), 0);
            }
        }

        public object UpdateData()
        {
            object obj2;
            clsSoDuDauKyHangHoa objTKHH = this.objTKHH;
            objTKHH.Khoa = this.cFrmKhoa;
            objTKHH.NamThang = this.cFrmNamThang;
            objTKHH.KhoaHangHoa = this.cFrmKhoaHangHoa;
            objTKHH.KhoaKho = Conversions.ToString(this.CboKho.SelectedValue);
            objTKHH.KhoaDonViTinh = Conversions.ToString(this.CboDonViTinh.SelectedValue);
            objTKHH.HeSo = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtQuyCach.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.LoaiTien = Conversions.ToString(this.CboLoaiTien.SelectedValue);
            objTKHH.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.SoLuong = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtSoLuong.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.DonGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtDonGia.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.ThanhTienNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtThanhTien.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.ThanhTien = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtThanhTienGS.Value), 0, modGeneral.TypeOfValue.Nothing));
            objTKHH.KhoaTKHangHoa = this.AdvTKHangHoa.Value;
            objTKHH.DienGiai = this.TxtDienGiai.Text;
            objTKHH.KhoaNguoiDung = modGeneral.H_USERID;
            objTKHH.KhoaDonVi = modGeneral.H_CLIENT;
            objTKHH.SoLoHang = this.TxtSoLoHang.Text.Trim();
            if (this.CKHanDung.Checked)
            {
                objTKHH.HanSuDung = LVYModule.Date2Char(this.TxtNgayNhap.Text);
            }
            else
            {
                objTKHH.HanSuDung = "";
            }
            return objTKHH.Save();
            objTKHH = null;
            return obj2;
        }

        internal virtual ADVAccount AdvTKHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKHangHoa = value;
            }
        }

        internal virtual ComboBox CboDonViTinh
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDonViTinh;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboDonViTinh_SelectedIndexChanged);
                if (this._CboDonViTinh != null)
                {
                    this._CboDonViTinh.SelectedIndexChanged -= handler;
                }
                this._CboDonViTinh = value;
                if (this._CboDonViTinh != null)
                {
                    this._CboDonViTinh.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboKho
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKho;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKho = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual CheckBox CKHanDung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKHanDung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CKHanDung_CheckedChanged);
                if (this._CKHanDung != null)
                {
                    this._CKHanDung.CheckedChanged -= handler;
                }
                this._CKHanDung = value;
                if (this._CKHanDung != null)
                {
                    this._CKHanDung.CheckedChanged += handler;
                }
            }
        }

        internal virtual CheckBox CKNgayNhap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CKNgayNhap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CKNgayNhap = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdCancel = value;
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual Button CmdTimHangHoa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdTimHangHoa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdTimHangHoa_Click);
                if (this._CmdTimHangHoa != null)
                {
                    this._CmdTimHangHoa.Click -= handler;
                }
                this._CmdTimHangHoa = value;
                if (this._CmdTimHangHoa != null)
                {
                    this._CmdTimHangHoa.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        public string KhoaKho
        {
            get
            {
                return this.mKhoaKho;
            }
            set
            {
                this.mKhoaKho = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual TextBox TxtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtDienGiai_LostFocus);
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus -= handler;
                }
                this._TxtDienGiai = value;
                if (this._TxtDienGiai != null)
                {
                    this._TxtDienGiai.LostFocus += handler;
                }
            }
        }

        internal virtual C1NumericEdit TxtDonGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDonGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtDonGia_LostFocus);
                if (this._TxtDonGia != null)
                {
                    this._TxtDonGia.ValueChanged -= handler;
                }
                this._TxtDonGia = value;
                if (this._TxtDonGia != null)
                {
                    this._TxtDonGia.ValueChanged += handler;
                }
            }
        }

        internal virtual DateTimePicker TxtHanSuDung
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtHanSuDung;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtHanSuDung = value;
            }
        }

        internal virtual TextBox TxtMaHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaHang = value;
            }
        }

        internal virtual DateTimePicker TxtNgayNhap
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayNhap;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayNhap = value;
            }
        }

        internal virtual C1NumericEdit TxtQuyCach
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtQuyCach;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtQuyCach = value;
            }
        }

        internal virtual TextBox TxtSerial
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSerial;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSerial = value;
            }
        }

        internal virtual TextBox TxtSoLoHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoLoHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtSoLoHang = value;
            }
        }

        internal virtual C1NumericEdit TxtSoLuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtSoLuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtSoLuong_LostFocus);
                if (this._TxtSoLuong != null)
                {
                    this._TxtSoLuong.ValueChanged -= handler;
                }
                this._TxtSoLuong = value;
                if (this._TxtSoLuong != null)
                {
                    this._TxtSoLuong.ValueChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtTenHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenHang = value;
            }
        }

        internal virtual C1NumericEdit TxtThanhTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtThanhTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtThanhTien_LostFocus);
                if (this._TxtThanhTien != null)
                {
                    this._TxtThanhTien.ValueChanged -= handler;
                }
                this._TxtThanhTien = value;
                if (this._TxtThanhTien != null)
                {
                    this._TxtThanhTien.ValueChanged += handler;
                }
            }
        }

        internal virtual C1NumericEdit TxtThanhTienGS
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtThanhTienGS;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtThanhTienGS = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }
    }
}

